/**
 * 
 */
function Score(){
	array=new Array();
	document.getElementById("btn1").onclick=hap;
	document.getElementById("btn2").onclick=list;
	this.mid=mid;
	this.kor=kor;
	this.eng=eng;
	this.tot=0;
	this.avg=0;
	this.compute = function(){
		this.tot = this.kor + this.eng;
		this.avg = this.tot/2;
	}
	
	this.getTot=function(){return this.tot;}
	this.getAvg=function(){return this.avg;}
}
function hap(){
	f = document.frm;
	var id = f.mid.value;
	var su1 = f.kor.value;
	var su2 = f.eng.value;
	var sum = Number(su1)+Number(su2);
	var avgg = Number(sum)/2.0;
	f.tot.value = sum;
	f.avg.value = avgg;
	array.push("&nbsp;"+id+"&nbsp;&nbsp;&nbsp;",su1+"&nbsp;&nbsp;&nbsp;",su2+"&nbsp;&nbsp;&nbsp;",sum+"&nbsp;&nbsp;&nbsp;",avgg+"<br/>");
	
	
}
function list(){
	
	var rst = document.getElementById('resultDiv');
	rst.innerHTML = array.join(' ');
	
}